package com.ycj.design.create.singleton;

import java.time.Instant;

/**
 * @author chuanjieyang
 * @date Nov 20, 2018 11:32:41 AM
 */
public class MainTest {

    private static Instant instant =Instant.now();

    static {
        System.out.println("静态代码块时间"+Instant.now().getNano());
    }

    public static void main(String[] args) {
        System.out.println(instant.getNano());
       /* Thread thread = new Thread(() -> {

                // SingletonPatternOne instance = SingletonPatternOne.getInstance();
                *//*User user = new User();
                System.out.println(user);*//*
                    SingletonPatternThree instance = SingletonPatternThree.getInstance();
                    System.out.println(instance);



        });
        Thread thread1 = new Thread(() -> {

                // SingletonPatternOne instance = SingletonPatternOne.getInstance();
                *//*User user = new User();
                System.out.println(user);*//*
                    SingletonPatternThree instance = SingletonPatternThree.getInstance();
                    System.out.println(instance);


        });
        thread.start();
        thread1.start();*/
    }
}
